<?php
/**注意此文档为UTF-8的编码.
 * Created on 2010-5-28
 *
 * @author EXT <isrn@qq.com>
 *
 */
function hd1($cs=array(
				'data'	=>'result',
				'height' =>'600',
				'width'	=>'300',
				'result'	=>'',
				'zhi'=>''
				)){
	$height	=	$cs['height']==''?600:$cs['height'];
	$width	=	$cs['width']==''?600:$cs['width'];
	$result	=	$cs['result'];
$hd['css']="<style>	
		#ifocus {width:".$width."px;height:".$height."px; position:relative; overflow:hidden}
		#ifocus_pic { display:inline;width:500px; height:".$height."px; overflow:hidden;  }
		#ifocus_piclist { width:100% ; position:absolute;}
		#ifocus_piclist li {width:".$width."px; height:".$height."px; overflow:hidden; position:relative; }
		#ifocus_piclist img { width:100%; height:100%; position:absolute; top:0;left:0; }
		#ifocus_piclist .focusTitle { width:100%;line-height:30px;height:30px; position:absolute; top:0; left:0;filter: Alpha(Opacity=50);
	-moz-opacity: 0.5; }
		#ifocus_btn { display:block;  position:absolute; height:64px; width:657px;  bottom:0; left:0px; overflow:hidden; }
		#ifocus_btn ul{height:64px;}
		#ifocus_btn li {height:62px; margin:0 2px; overflow:hidden; width:84px; vertical-align:bottom; float:left; border:#d0d4d7 solid 1px;
		                 background:url(/Plug-in/hd/1/images/discovery_0720_17.gif);cursor:pointer;
		                }
		#ifocus_btn li a{color:#33779e;display:block; height:25px; width:198px; float:left; overflow:hidden;
		                  text-align:left; text-decoration:none; 
		                 }
		#ifocus_btn li span{padding-right:20px; padding-top:3px; padding-bottom:3px; line-height:30px; 
		                  background:url(/Plug-in/hd/1/images/discovery_0720_20.gif) 0px right no-repeat;
		                 }
		#ifocus_btn li p{ float:left; width:198px; text-align:left; height:40px; overflow:hidden; line-height:20px;}
		#ifocus_btn li img{ float:left; width:84px; height:62px; margin-right:3px;}
		#ifocus_btn .current { width:286px;}
		
		.focusPlay
		{
			position:absolute; top:10px; right:10px; width:269px; height:217px; z-index:4444;  overflow:hidden;background:#000;padding-top:15px;
		}
        
		#ifocus_piclist .focusTitlet { width:100%;line-height:30px;height:30px; position:absolute;font-size:16px;font-weight:700;
		bottom :0; left:0; z-index: 999; filter: Alpha(Opacity=50);background: #fff; -moz-opacity: 0.5; }   </style> ";
$hd['head']="<script src=\"/Plug-in/hd/1/js/ifocus.js\" type=\"text/javascript\"></script>   ";
$hd['body']="";
$hd['footer']="";
if($cs['zhi']=='load'){$hd['load']="<div id=\"ifocus\">
                    <div style=\"width: ".$width."px; height: ".$height."px; overflow: hidden; position: relative;\">
                        <div id=\"ifocus_pic\">
                            <div id=\"ifocus_piclist\" style=\"left: 0; top: 0;\">
                                <ul>
				";
	foreach ($result as $value){
$hd['load'].= "<li><a href=\"index.php?mid=3&op=show&id=".$value['id']."\" target=\"_blank\"><img src=\"/uplods/pic/".$value['pic']."\"/></a></li>";
			}
	
	$hd['load'].="								
                                </ul>
                            </div>
                        </div>

                    </div>
                    <div id=\"ifocus_btn\">
                        <ul>";
	foreach ($result as $value){
           $hd['load'].=               "  <li class=\"current\"><img alt=\"1\" src=\"/uplods/pic/".$value['pic']."\" /><p>".$value['tt']."</p><a href=\"index.php?mid=3&op=show&id=".$value['id']."\" target=\"_blank\"><span>了解更多详情</span></a></li>";
				}
		$hd['load'].="								
					
                        </ul>
                    </div></div>";}
return $hd[$cs['zhi']];
	}
?>